package com.example.springcloudwinter;

import com.example.springcloudwinter.token.AuthenticationToken;
import com.example.springcloudwinter.token.JWTAuthenticationToken;
import com.example.springcloudwinter.token.JWTPropertiesInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class GatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class,args);
    }

    @Bean
    public AuthenticationToken getAuthenticationToken(@Autowired JWTPropertiesInterface jwtProperties){
        return new JWTAuthenticationToken(jwtProperties);
    }

}
